/*
 * @Author: gonghairun
 * @Date: 2021-10-21 19:22:09
 * @LastEditors: gonghairun
 * @LastEditTime: 2021-10-22 16:02:22
 * @Description: 
 */
import { Service } from '@/network/http.js'
import config from '@/network/config';
const Base64 = require('js-base64').Base64;
/**
 *  预览文件
 * @param {*} params 
 */
export const previewFile = (fileId) => {
    Service.get(`${this.$ServiceName}/api/external/protected/getminiopreviewurl?fileId=${fileId}`).then((res)=>{
        let url = res.data.data //要预览文件的访问地址
        window.open(config.ConfigPreviewUrl+encodeURIComponent(Base64.encode(url)));
    })
}